home *** CD-ROM | disk | FTP | other *** search
- on doStartMenu menuItemToSelect
- global gStartButtonDown, gCurrSubMenu, gCurrMainHiPos, gPromptV
- if voidp(gStartButtonDown) then
- set gStartButtonDown to 0
- end if
- if gStartButtonDown = 1 then
- set gStartButtonDown to 0
- exit
- end if
- set gCurrSubMenu to EMPTY
- puppetSprite(29, 1)
- puppetSprite(30, 1)
- puppetSprite(31, 1)
- puppetSprite(32, 1)
- puppetSprite(33, 1)
- puppetSprite(37, 1)
- set inc to 22
- set the castNum of sprite 29 to the castNum of sprite 29 + 1
- set the locH of sprite 30 to 320
- set the locV of sprite 30 to 240
- set the locH of sprite 37 to 214
- set the castNum of sprite 37 to cast "point left.pict"
- if menuItemToSelect contains "prog" then
- set gPromptV to 250
- else
- if menuItemToSelect contains "doc" then
- set gPromptV to 280
- else
- if menuItemToSelect contains "set" then
- set gPromptV to 310
- else
- if menuItemToSelect contains "find" then
- set gPromptV to 340
- else
- if menuItemToSelect contains "help" then
- set gPromptV to 370
- else
- if menuItemToSelect contains "run" then
- set gPromptV to 400
- else
- if menuItemToSelect contains "shut" then
- set gPromptV to 430
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set the locV of sprite 37 to gPromptV
- updateStage()
- set lastHilite to EMPTY
- set startMouse to the mouseUp
- repeat while 1 = 1
- doControl()
- if rollOver(30) then
- if (the mouseV > 235) and (the mouseV <= 265) then
- set hilite to "prog"
- else
- if (the mouseV > 265) and (the mouseV <= 295) then
- set hilite to "doc"
- else
- if (the mouseV > 295) and (the mouseV <= 325) then
- set hilite to "set"
- else
- if (the mouseV > 325) and (the mouseV <= 355) then
- set hilite to "find"
- else
- if (the mouseV > 355) and (the mouseV <= 385) then
- set hilite to "help"
- else
- if (the mouseV > 385) and (the mouseV <= 415) then
- set hilite to "run"
- else
- if (the mouseV > 415) and (the mouseV <= 455) then
- set hilite to "shut"
- else
- set hilite to "blankHilite"
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set the castNum of sprite 31 to cast hilite
- set the locH of sprite 31 to 320
- set the locV of sprite 31 to 240
- updateStage()
- if the mouseUp <> startMouse then
- if menuItemToSelect = hilite then
- doCloseMenu()
- goNext()
- exit
- end if
- end if
- if hilite <> lastHilite then
- set lastHilite to hilite
- set hiliteTimer to the ticks
- else
- if (the ticks - hiliteTimer) > 15 then
- showSubMenu(hilite, menuItemToSelect, inc)
- end if
- end if
- next repeat
- end if
- if rollOver(32) then
- set the castNum of sprite 31 to cast gCurrSubMenu
- set the locH of sprite 31 to 320
- set the locV of sprite 31 to 240
- updateStage()
- set startMouse to the mouseUp
- repeat while rollOver(32)
- doControl()
- set subTop to the top of sprite 32 + 4
- if (the mouseV > subTop) and (the mouseV <= (subTop + inc)) then
- set subHilite to "sub" & gCurrSubMenu & "1"
- else
- if (the mouseV > (subTop + inc)) and (the mouseV <= (subTop + (inc * 2))) then
- set subHilite to "sub" & gCurrSubMenu & "2"
- else
- if (the mouseV > (subTop + (inc * 2))) and (the mouseV <= (subTop + (inc * 3))) then
- set subHilite to "sub" & gCurrSubMenu & "3"
- else
- if (the mouseV > (subTop + (inc * 3))) and (the mouseV <= (subTop + (inc * 4))) then
- set subHilite to "sub" & gCurrSubMenu & "4"
- else
- if (the mouseV > (subTop + (inc * 4))) and (the mouseV <= (subTop + (inc * 5))) then
- set subHilite to "sub" & gCurrSubMenu & "5"
- else
- if (the mouseV > (subTop + (inc * 5))) and (the mouseV <= (subTop + (inc * 6))) then
- set subHilite to "sub" & gCurrSubMenu & "6"
- else
- if (the mouseV > (subTop + (inc * 6))) and (the mouseV <= (subTop + (inc * 7))) then
- set subHilite to "sub" & gCurrSubMenu & "7"
- else
- if (the mouseV > (subTop + (inc * 7))) and (the mouseV <= (subTop + (inc * 8))) then
- set subHilite to "sub" & gCurrSubMenu & "8"
- else
- set subHilite to "blankHilite"
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- set the castNum of sprite 33 to cast subHilite
- set the locH of sprite 33 to 320
- set the locV of sprite 33 to 240
- updateStage()
- if the mouseUp <> startMouse then
- if menuItemToSelect = subHilite then
- doCloseMenu()
- goNext()
- exit
- end if
- end if
- end repeat
- set the castNum of sprite 33 to cast "blankHilite"
- updateStage()
- next repeat
- end if
- set subHilite to "blankHilite"
- if gCurrSubMenu = EMPTY then
- set the castNum of sprite 31 to cast "blankHilite"
- end if
- updateStage()
- set startMouse to the mouseUp
- repeat while not (rollOver(30) or rollOver(32))
- doControl()
- if the mouseUp <> startMouse then
- if the mouseDown then
- doCloseMenu()
- exit
- next repeat
- end if
- set startMouse to the mouseUp
- end if
- end repeat
- end repeat
- doCloseMenu()
- end
-
- on doCloseMenu
- global gStartButtonDown
- if the mouseCast = the number of cast "start.btn.down" then
- set gStartButtonDown to 1
- else
- set gStartButtonDown to 0
- end if
- puppetSprite(29, 0)
- puppetSprite(30, 0)
- puppetSprite(31, 0)
- puppetSprite(32, 0)
- puppetSprite(33, 0)
- puppetSprite(37, 0)
- updateStage()
- end
-
- on showSubMenu subName, menuItemToSelect, inc
- global gCurrSubMenu, gPromptV
- set the locH of sprite 32 to -1000
- set the locH of sprite 33 to -1000
- if "prog doc set find" contains subName then
- set the castNum of sprite 32 to cast ("sub" & subName)
- set the locH of sprite 32 to 320
- set the locV of sprite 32 to 240
- set gCurrSubMenu to subName
- updateStage()
- else
- set gCurrSubMenu to EMPTY
- end if
- if menuItemToSelect = subName then
- set x to the right of sprite 31 + 48
- set y to 370
- set the castNum of sprite 37 to cast "prompt.pict"
- set the locH of sprite 37 to x
- set the locV of sprite 37 to y
- else
- if menuItemToSelect contains subName then
- set x to the right of sprite 32 + 47
- set linenum to value(char the number of chars in menuItemToSelect of menuItemToSelect)
- set y to (linenum * inc) - (inc / 2) + the top of sprite 32
- set the castNum of sprite 37 to cast "prompt.pict"
- set the locH of sprite 37 to x
- set the locV of sprite 37 to y
- else
- set the locH of sprite 37 to 214
- set the castNum of sprite 37 to cast "point left.pict"
- set the locV of sprite 37 to gPromptV
- end if
- end if
- updateStage()
- updateStage()
- end
-